<{layout name="admin/layout/default" /}>
<div class="row" id="edit_auth" data-page="role/auth">
    <div class="row">
        <div class="col-lg-12">
            <a class="btn btn-default" href="<{:url('admin/role/list')}>">返回</a>
        </div>
    </div>

    <hr />
    <div class="col-lg-12">

        <!-- Nav tabs -->
        <ul class="nav nav-tabs">
            <li v-if="data" v-for="(data, key) in pageData.permission" :class="[key==0 ? 'active' : '']"><a :href="'#tab' + data.id" data-toggle="tab">${data.name}</a></li>
        </ul>

        <div class="tab-content">
            <div v-if="data" v-for="(data, key) in pageData.permission" class="tab-pane" :class="[key==0 ? 'active' : '']" :id="'tab' + data.id">
                <div class="form-group">
                    <div v-if="item" v-for="item in data.permissions" class="checkbox">
                        <label>
                            <input type="checkbox" v-model="auth" :value="item.id">${item.name}
                        </label>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-lg-2 col-lg-offset-5 m-b-xl">
                <div class="btn btn-primary btn-block" @click="submit()">提交</div>
            </div>
        </div>
    </div>
</div>
